package com.itheima.health.controller;


import com.itheima.health.common.MessageConst;
import com.itheima.health.entity.Result;
import com.itheima.health.pojo.Setmeal;
import com.itheima.health.service.SetMealService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @description 移动端套餐控制器
 **/
@RestController
@RequestMapping("/mobile/setmeal")
@Slf4j
public class MobileSetMealController {
    @Autowired
    private SetMealService setMealService;

   //根据Id查询套餐详情（基本信息，对应检查组信息，对应检查项信息）
    @RequestMapping("findById")
    public Result findById(Integer id){
        //调用DAO层查询并返回
        Setmeal setmeal = setMealService.findById(id);
        //构造返回结果并返回
        return new Result(true, MessageConst.QUERY_SETMEAL_SUCCESS,setmeal);

    }
}
